﻿namespace DBCUnit.Contracts
{
	
	[Condition]
	public class WhenPreConditionIsPresentInContractCondition
	{

		private int preConditionExecutionCount = 0;

		[PreCondition]
		public void PreCondition()
		{
			preConditionExecutionCount += 1;
		}

		[PostCondition]
		public void ThePreConditionIsExecutedOnlyOnce()
		{
			Assert.That(preConditionExecutionCount).Equals(1);
		}

	}

}
